package com.sunyur.tailor.channel.service.inner.workflow.param;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Instance implements Serializable {
/**
 * @program: tailor_channel
 * @description:
 * @author: pengbing
 * @create: 2021-07-08 19:30
 **/
    /**
     * 审批流名称
     */
    @NotEmpty(message = "审批流名称不能为空")
    @Size(max = 64, message = "审批流名称长度不能超过64")
    private String name;
    /**
     * 业务对象 目前支持 申请单:applyOrder,收获单:receiveOrder, 策略单:strategyOrder,供应商:supplier,询价单:inquireOrder,招标单:tenderOrder,发票单：invoiceOrder, 订单：order,供应商事务单据:txOrder,  对账单:settleOrder
     */
    @NotEmpty(message = "业务对象不能为空")
    @Size(max = 64, message = "业务对象长度不能超过64")
    private String business;

    /**
     * (申请单)提交：commit,（询价单）定标：fixed,（招标单）定标：fixed  （发票单）提交财务审核：commitFinance，（订单）提交: commit,(供应商事务单号)信息变更: infoChange, 确认: confirm
     */
    @NotEmpty(message = "业务事件不能为空")
    @Size(max = 64, message = "业务事件长度不能超过64")
    private String action;
    /**
     * 申请单号 业务单据code 最大长度64
     */
    @NotEmpty(message = "申请单号不能为空")
    @Size(max = 64, message = "申请单号长度不能超过64")
    private String businessCode;

    /**
     * 联合制单，表单数据
     */
    private String formData;
    /**
     * 0 进行 1已结束
     */
    @NotEmpty(message = "instanceStatus不能为空")
    private Integer instanceStatus;
    /**
     * 审批状态 0 待审批 1:通过，2:驳回 3:撤回 4:异常
     */
    @NotEmpty(message = "processStatus")
    private Integer processStatus;
    /**
     * 最终状态描述
     */
    private String description;

}
